/**  
 * @Title: SmsController.java
 * @Package org.wk.common.api.controller
 * @Description: TODO【】
 * @author df.w 
 * @date 2018年5月3日 下午5:11:46
 * @version V1.0  
 */ 

package org.wk.common.api.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.wk.common.service.SmsService;
import org.wk.core.common.view.ResponseVo;

import com.alibaba.fastjson.JSONObject;

/**
 * @ClassName	: SmsController
 * @Package		：org.wk.common.api.controller
 * @Author df.w 
 * @Create Time	：2018年5月3日 下午5:11:46
 * @Description	: 
 */
@RestController
public class SmsController {
	private final Logger logger = LoggerFactory.getLogger(this.getClass());

	@Autowired
	private SmsService smsService;
	
	@RequestMapping(value ="/mobile_phone/send_code",method = RequestMethod.POST,produces=MediaType.APPLICATION_JSON_UTF8_VALUE)
	public String sendSms(@RequestBody JSONObject jsonObject) {
		logger.info("发送手机验证码>>>>{}",jsonObject.toString());
		
		ResponseVo responseVo = smsService.sendSms(jsonObject);
		
		logger.info("发送手机验证码，返回值>>>>{}",responseVo.toString());
		return responseVo.toString();
	}
}
